package com.bluestone.scripts;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;

import com.bluestone.util.Util;

public class ScriptTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Script command = null;
		try{
			String str= "<script name=\"t\"><action type=\"test\" target=\"target1\" /></script>";
			JAXBContext context = JAXBContext.newInstance(Script.class);
			Unmarshaller  unmarshaller = context.createUnmarshaller();
			command = (Script)unmarshaller.unmarshal(new java.io.StringReader(str));
			Util.info("load project file:"+command.getActions().size());
		}catch(Exception me){
			Util.error("load project file failure:"+me);
		}

	}

}
